// pages/test_baby/test3/test3.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    img_list:[
      "/images/test/nizhenbang.jpg",
      "/images/test/hainengjinbu.jpg",
      "/images/test/haideinuli.jpg"
    ],
    lianxi:"",
    pingjia:[
      "真棒！继续保持",
      "还有进步空间，加油！",
      "不疯魔不成活！此时不搏何时搏！",
    ],
    index:0
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var zhengque = Number(options.zhengque);
    var cuowu = Number(options.cuowu);
    var zql = (zhengque/(zhengque+cuowu))*100; 
    let lianxi = "本次考试共答对"+zhengque+"道题,答错"+cuowu+"道题,正确率为"+zql.toFixed(2)+"%";
    this.setData({lianxi:lianxi})
    if (zql<60) {
      this.setData({index:2});
    }else if(zql>60&&zql<80){
      this.setData({index:1});
    }else{null}
  },

})